<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>$$.getUrlParams([url,type])</title>

<!-- KUI -->
<link rel="stylesheet" href="../../../style/kelat.css" media="all"/>
<!-- 扩展样式 -->
<link rel="stylesheet" href="../../../style/theme.css" media="all"/>

</head>
<body >
<div>
   <div class="HelpBox">
   
    <h2><span>返回值:Object</span>$$.getUrlParams([url,type])</h2>
    <h3>概述</h3>
    <div class="desc">
      <p> 将连接参数序列化成为对象。</p>
    </div>
    <h3>参数</h3>
    <div class="parameter">
		<h4><strong>url</strong><span>String</span></h4>
		<p>将指定的url地址进行序列化。</p>
		<h4><strong>type</strong><span>Object</span></h4>
		<p>指定特殊字符截取。需要设置两个值，[value0,value1] , value0是需要从哪个特殊字符截取，value1是需要截取的 key 。</p>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
      <h4>描述:</h4>
      <p>获取链接参数</p>
      <h5>js 代码:</h5>
      <pre><code>$$.getUrlParams();</code></pre>
      <h4>描述:</h4>
      <p>获取指定链接参数</p>
      <h5>js 代码:</h5>
      <pre><code>var UrlSet = $$.getUrlParams({'url':'http://www.kui.com/kui.html?id=1'});</code></pre>
	  <h5>结果:</h5>
      <pre><code>UrlSet.id  // 1</code></pre>
      <h4>描述:</h4>
      <p>获取指定参数的值。没有url参数时， 获取当前地址栏中的url，</p>
      <h5>js 代码:</h5>
      <pre><code>var UrlSet = $$.getUrlParams({'url':'http://www.kui.com/kui.html?id=1&name=name','type':['name=','name']});</code></pre>
	  <h5>结果:</h5>
      <pre><code>UrlSet.name  // name
UrlSet.id  // undefined</code></pre>
    </div>

</div>

</div>
</body>
</html>
